package cease.butter;

import java.io.IOException;
import java.util.Properties;

import cease.util.ParseUtil;

/**
 * @author dhf
 */
public class Constants {
    private static Properties config = new Properties();

    static {
        try {
            config.load(ClassLoader
                    .getSystemResourceAsStream("conf/base.properties"));
        } catch (IOException e) {
            throw new IllegalStateException(e);
        }
    }

    public static String APP_NAME = config.getProperty("app.name");

    public static String APP_VERSION = config.getProperty("app.version");

    public static String APP_VERSION_URL = config
            .getProperty("app.version.url");

    public static String APP_DOWNLOAD_URL = config
            .getProperty("app.download.url");

    public static String APP_DOWNLOAD_FILENAME = config
            .getProperty("app.download.filename");

    public static String PROJECT_URL = config.getProperty("app.project.url");

    public static String SOURCE = config.getProperty("post.source");

    public static int MAX_CHAR = ParseUtil.parseInt(
            config.getProperty("post.char.max"), 163);

    public static String CHARSET = config.getProperty("charset.default",
            "UTF-8");

    public static String URL_PHOTO_UPLOAD = config
            .getProperty("url.photo.upload");

    public static String URL_FRIENDSHIP_ADD = config
            .getProperty("url.friendship.follow");

    public static String URL_FRIENDSHIP_DELETE = config
            .getProperty("url.friendship.unfollow");

    public static String URL_BLOCK_ADD = config.getProperty("url.block.add");

    public static String URL_BLOCK_DELETE = config
            .getProperty("url.block.delete");

    public static String URL_BLOCK_CHECK = config
            .getProperty("url.block.check");

    public static String URL_TIMELINE_HOME = config
            .getProperty("url.timeline.home");

    public static String URL_TIMELINE_PUBLIC = config
            .getProperty("url.timeline.public");

    public static String URL_TIMELINE_USER = config
            .getProperty("url.timeline.user");

    public static String URL_TIMELINE_MENTION = config
            .getProperty("url.timeline.mention");

    public static String URL_TIMELINE_RETWEET = config
            .getProperty("url.timeline.retweet");

    public static String URL_BUTTER_SHOW = config
            .getProperty("url.butter.show");

    public static String URL_BUTTER_MUTE = config
            .getProperty("url.butter.mute");

    public static String URL_BUTTER_UNMUTE = config
            .getProperty("url.butter.unmute");

    public static String URL_BUTTER_POST = config
            .getProperty("url.butter.post");

    public static String URL_BUTTER_RETWEET = config
            .getProperty("url.butter.retweet");

    public static String URL_BUTTER_DELETE = config
            .getProperty("url.butter.delete");

    public static String URL_FAVORITE_SHOW = config
            .getProperty("url.favorite.show");

    public static String URL_FAVORITE_ADD = config
            .getProperty("url.favorite.add");

    public static String URL_FAVORITE_DELETE = config
            .getProperty("url.favorite.delete");

    public static String URL_NOTICE_COUNT = config
            .getProperty("url.unreads.count");

    public static String URL_MESSAGE_SHOW = config
            .getProperty("url.message.show");

    public static String URL_MESSAGE_CREATE = config
            .getProperty("url.message.create");

    public static String URL_MESSAGE_DELETE = config
            .getProperty("url.message.delete");
}
